package common;

public class ClientEntity {
	protected int id;
	protected String password;
	public ClientEntity(int id, String pw) {
		this.id = id;
		this.password = pw;
	}
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @return the ip
	 */
	public String getPassword() {
		return password;
	}
	
	@Override
	public boolean equals(Object o) {
		if(o.getClass().equals(ClientEntity.class)) {
			return (id == ((ClientEntity) o).id) && (password.equals(((ClientEntity) o).password));
		} else {
			return false;
		}
	}
	
	@Override
	public int hashCode() {
		return id;
	}
	
	public String toString(){
		return id+" "+password;
	}
}
